package usf.gwt.ui.bootstrap.client;

import com.google.gwt.event.logical.shared.ValueChangeEvent;

public class CheckedMenuItem extends NavItem {

    protected CheckBox check;

    public CheckedMenuItem() {
        check = new CheckBox();
        add(check);
    }

    public void setText(String text) {
        check.setText(text);
    }
    public String getText() {
        return check.getText();
    }

    public void setColor(String color) {
        check.setColor(color);
    }

    public void setChecked(boolean checked) {
        check.setChecked(checked);
        ValueChangeEvent.fire(check, checked);
    }

    public boolean isChecked() {
        return check.getChecked();
    }

}
